package edu.hunau.cxb.action;

import com.alibaba.dubbo.config.annotation.Reference;
import edu.hunau.cxb.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Description:
 * @author: hb
 * @Date: 2019-04-12 0:04
 */
@Controller
@RequestMapping("/user")
public class UserController {
    @Reference  //不能自动装配,引用(远程注入)
    private UserService userService;
    @RequestMapping("/show")
    @ResponseBody
    public String showName(){
        return userService.getName();
    }

}
